import { createRouter, createWebHistory } from 'vue-router';
import Register from '@/views/Register.vue';
import Home from '@/views/Home.vue'; // 引入 Home 组件
import About from '@/views/About.vue'; // 引入 About 组件

const routes = [
    {
        path: '/', // 路径
        name: 'Home', // 路由名称
        component: Home, // 对应的组件
      },
      {
        path: '/about',
        name: 'About',
        component: About,
      },
      {
        path: '/register',
        name: 'Register',
        component: Register,
      },
  
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;